package znbkBkfx.BKFX_ZW;

import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageView;

import com.example.znbk.znbklibrary.base.BaseRecyclerAdapter;
import com.example.znbk.znbklibrary.base.BaseRecyclerViewHolder;
import com.example.znbk.znbklibrary.dialog.PhotoDialog;
import com.lancoo.znbkxx.R;

import java.util.List;

public class PhotoShowResultAdapter extends BaseRecyclerAdapter {

    private Context context;
    private LayoutInflater inflater;
    public PhotoShowResultAdapter(Context context){
        this.context = context;
        inflater=LayoutInflater. from(context);
    }

    @Override
    public int getItemCount() {
        return 7;
    }

    @Override
    public View getHolderView(ViewGroup parent, int position) {
        View view = inflater.inflate(R.layout.adapter_item_photo,parent, false);
        return view;
    }

    private ImageView mIvPhoto;
    @Override
    public void onBindViewHolder(BaseRecyclerViewHolder baseRecyclerViewHolder, int position) {
        mIvPhoto = baseRecyclerViewHolder.getView(R.id.iv_photo);
        mIvPhoto.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PhotoDialog photoDialog = new PhotoDialog(context);
                photoDialog.show();
            }
        });
    }
}
